package java_DesignPattern.BehavioralPattern.StatePattern.After;

/**
 * 电梯关门状态类
 */
public class Close extends LiftState {

    @Override
    public void run() {

    }

    @Override
    public void stop() {

    }

    @Override
    public void open() {
        //修改电梯状态为打开
        this.systemContext.setLiftState(SystemContext.OPEN);
        //调用电梯打开方法
        this.systemContext.open();
    }

    @Override
    public void close() {
        System.out.println("电梯关门");
    }
}
